package com.baosight.xdata;

import com.github.javafaker.Faker;
import lombok.Data;

import java.io.Serializable;

@Data
public class Book implements Serializable {
    private String title;
    private String author;

    public static Book create() {
        com.github.javafaker.Book fakerBook = Faker.instance().book();
        Book book = new Book();
        book.setTitle(fakerBook.title());
        book.setAuthor(fakerBook.author());
        return book;
    }
}
